import time

import requests

from config import BASE_URL


class Register:
    # 获取验证码信息
    def get_verify(self, mobile):
        return requests.post(url=BASE_URL + "/wx/auth/regCaptcha",json={"mobile":mobile})

    # 注册
    def register(self, register_data):
        return requests.post(url=BASE_URL + "/wx/auth/register",json=register_data)

if __name__ == '__main__':
    re = Register()
    time.sleep(60)
    print(re.get_verify(13000000000).json())
    re_data = {"code":"666666","username":"jack","password":"123456","repeatPassword":"123456","mobile":"13000000000"}
    print(re.register(re_data).json())
